﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using System.Diagnostics;

namespace SeleniumToolkit
{
    [TestFixture]
    public class JavaInstalledTest
    {
        [Test]
        public void IsJavaInstalled()
        {
            
            Process process = Process.Start(new ProcessStartInfo("java"));
            process.Kill();
        }

        [Test]
        public void TestJavaInPath()
        {
            string path = Environment.GetEnvironmentVariable("PATH");
            Assert.IsNotNull(path, "PATH isn't available?");
            Console.WriteLine(path);
            Assert.IsTrue(path.IndexOf("java", StringComparison.OrdinalIgnoreCase) > 0);
        }
    }
}
